package com.example.demo1103.demo1;

public class Test {
    public static void main(String[] args) {

        FunctionTest functionTest= new FunctionTest() {
            @Override
            public void show() {
                System.out.println("hello world");
            }
        };
        fun(functionTest);
        FunctionTest functionTest1=()->{
            System.out.println("lambda表达式");
        };
        fun(functionTest1);
    }
    public static void fun(FunctionTest functionTest){
        functionTest.show();
    }
}
interface FunctionTest{
    void show();
}
